﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<ObjectModel.Customer>" %>
<%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>

<asp:Content ID="Content1" ContentPlaceHolderID="MainContent" runat="server">


<ext:ResourceManager runat="server" />



<ext:FormPanel runat="server" ID="panel" Title="Cliente" Layout="FormLayout" Frame="true" >
	<Items>
			<ext:TextField runat="server" FieldLabel="Name" Name="Name"></ext:TextField>
			<ext:TextField runat="server" FieldLabel="CorporateName" Name="CorporateName"></ext:TextField>
			<ext:TextField runat="server" FieldLabel="Tel" Name="Tel"></ext:TextField>
			<ext:TextField runat="server" FieldLabel="Cel" Name="Cel"></ext:TextField>
			<ext:TextField runat="server" FieldLabel="Email" Name="Email"></ext:TextField>
			<ext:TextField runat="server" FieldLabel="Street" Name="Street"></ext:TextField>
			<ext:TextField runat="server" FieldLabel="Complement" Name="Complement"></ext:TextField>
			<ext:TextField runat="server" FieldLabel="CEP" Name="CEP"></ext:TextField>
			<ext:TextField runat="server" FieldLabel="Neighbourhood" Name="Neighbourhood"></ext:TextField>
			<ext:TextField runat="server" FieldLabel="City" Name="City"></ext:TextField>
			<ext:TextField runat="server" FieldLabel="State" Name="State"></ext:TextField>
			<ext:TextField runat="server" FieldLabel="Birthdate" Name="Birthdate"></ext:TextField>
			<ext:TextField runat="server" FieldLabel="Description" Name="Description"></ext:TextField>
			<ext:TextField runat="server" FieldLabel="Document" Name="Document"></ext:TextField>
			<ext:TextField runat="server" FieldLabel="MunicipalInscription" Name="MunicipalInscription"></ext:TextField>
			<ext:TextField runat="server" FieldLabel="StateInscription" Name="StateInscription"></ext:TextField>
			<ext:TextField runat="server" FieldLabel="Removed" Name="Removed"></ext:TextField>
	</Items>
	<Buttons>
		<ext:Button runat="server" ID="btnSave" Text="Salvar" Type="Submit">
            <Listeners>
                <Click Handler="#{panel}.getForm().submit({url:'/Customer/Insert',waitMsg:'Salvando...'})" />
            </Listeners>
		</ext:Button>
	</Buttons>
</ext:FormPanel>
<%-- 
<% using (Html.BeginForm()) { %>
    <%: Html.ValidationSummary(true) %>
    <fieldset>
        <legend>Customer</legend>

        <div class="editor-label">
            <%: Html.LabelFor(model => model.Name) %>
        </div>
        <div class="editor-field">
            <%: Html.EditorFor(model => model.Name) %>
            <%: Html.ValidationMessageFor(model => model.Name) %>
        </div>

        <div class="editor-label">
            <%: Html.LabelFor(model => model.CorporateName) %>
        </div>
        <div class="editor-field">
            <%: Html.EditorFor(model => model.CorporateName) %>
            <%: Html.ValidationMessageFor(model => model.CorporateName) %>
        </div>

        <div class="editor-label">
            <%: Html.LabelFor(model => model.Tel) %>
        </div>
        <div class="editor-field">
            <%: Html.EditorFor(model => model.Tel) %>
            <%: Html.ValidationMessageFor(model => model.Tel) %>
        </div>

        <div class="editor-label">
            <%: Html.LabelFor(model => model.Cel) %>
        </div>
        <div class="editor-field">
            <%: Html.EditorFor(model => model.Cel) %>
            <%: Html.ValidationMessageFor(model => model.Cel) %>
        </div>

        <div class="editor-label">
            <%: Html.LabelFor(model => model.Email) %>
        </div>
        <div class="editor-field">
            <%: Html.EditorFor(model => model.Email) %>
            <%: Html.ValidationMessageFor(model => model.Email) %>
        </div>

        <div class="editor-label">
            <%: Html.LabelFor(model => model.Street) %>
        </div>
        <div class="editor-field">
            <%: Html.EditorFor(model => model.Street) %>
            <%: Html.ValidationMessageFor(model => model.Street) %>
        </div>

        <div class="editor-label">
            <%: Html.LabelFor(model => model.Complement) %>
        </div>
        <div class="editor-field">
            <%: Html.EditorFor(model => model.Complement) %>
            <%: Html.ValidationMessageFor(model => model.Complement) %>
        </div>

        <div class="editor-label">
            <%: Html.LabelFor(model => model.CEP) %>
        </div>
        <div class="editor-field">
            <%: Html.EditorFor(model => model.CEP) %>
            <%: Html.ValidationMessageFor(model => model.CEP) %>
        </div>

        <div class="editor-label">
            <%: Html.LabelFor(model => model.Neighbourhood) %>
        </div>
        <div class="editor-field">
            <%: Html.EditorFor(model => model.Neighbourhood) %>
            <%: Html.ValidationMessageFor(model => model.Neighbourhood) %>
        </div>

        <div class="editor-label">
            <%: Html.LabelFor(model => model.City) %>
        </div>
        <div class="editor-field">
            <%: Html.EditorFor(model => model.City) %>
            <%: Html.ValidationMessageFor(model => model.City) %>
        </div>

        <div class="editor-label">
            <%: Html.LabelFor(model => model.State) %>
        </div>
        <div class="editor-field">
            <%: Html.EditorFor(model => model.State) %>
            <%: Html.ValidationMessageFor(model => model.State) %>
        </div>

        <div class="editor-label">
            <%: Html.LabelFor(model => model.Birthdate) %>
        </div>
        <div class="editor-field">
            <%: Html.EditorFor(model => model.Birthdate) %>
            <%: Html.ValidationMessageFor(model => model.Birthdate) %>
        </div>

        <div class="editor-label">
            <%: Html.LabelFor(model => model.Description) %>
        </div>
        <div class="editor-field">
            <%: Html.EditorFor(model => model.Description) %>
            <%: Html.ValidationMessageFor(model => model.Description) %>
        </div>

        <div class="editor-label">
            <%: Html.LabelFor(model => model.Document) %>
        </div>
        <div class="editor-field">
            <%: Html.EditorFor(model => model.Document) %>
            <%: Html.ValidationMessageFor(model => model.Document) %>
        </div>

        <div class="editor-label">
            <%: Html.LabelFor(model => model.MunicipalInscription) %>
        </div>
        <div class="editor-field">
            <%: Html.EditorFor(model => model.MunicipalInscription) %>
            <%: Html.ValidationMessageFor(model => model.MunicipalInscription) %>
        </div>

        <div class="editor-label">
            <%: Html.LabelFor(model => model.StateInscription) %>
        </div>
        <div class="editor-field">
            <%: Html.EditorFor(model => model.StateInscription) %>
            <%: Html.ValidationMessageFor(model => model.StateInscription) %>
        </div>

        <div class="editor-label">
            <%: Html.LabelFor(model => model.Removed) %>
        </div>
        <div class="editor-field">
            <%: Html.EditorFor(model => model.Removed) %>
            <%: Html.ValidationMessageFor(model => model.Removed) %>
        </div>

        <p>
            <input type="submit" value="Create" />
        </p>
    </fieldset>
<% } %>
--%>

<div>
    <%: Html.ActionLink("Back to List", "Index") %>
</div>

</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="HeaderContent" runat="server">
</asp:Content>

